﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Content.Master" Inherits="System.Web.Mvc.ViewPage<MethodWorx.CMS.UI.Models.CreatePageModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create Page
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script language="javascript">
        $(document).ready(function () {
            $("#parentPageInfo").tooltip({ showURL: false, showBody: " - " });
        });
    </script>
    <%using(Html.BeginForm()){ %>
        <%=Html.Hidden("parent", this.Model.Page.Id)%>
        <%if (this.Model.Page.Template.PageTemplateConstraints.Count() == 0)
          { %>
            <div class="formItem">
                <em>This page does not have any child page templates, use the schema editor to setup a child page template.</em>
            </div>
            <%=Html.FormButtons(
                (b) =>
                {
                    b.Submit("create", "Create Page Template >>");
                    b.Submit("cancel", "Cancel");
                }
            )%>
        <%}
          else
          { %>
            
            <div class="formItem">
                <label>Parent Page:</label>
                <div style="width:250px;float:left;padding-right:10px;"><%=Model.Page.Name%></div>
                <img id="parentPageInfo" style="" src="<%=Url.Content("~/Images/icons/information.png")%>" title="<%=Model.Page.Name %> - <%=Model.Page.Description %>"/>
            </div>
            <%=Html.FormDropDown("Template", "pageBasicDetails.PageTemplate", this.Model.GetPageTemplateSelectList())%>
            <%=Html.FormTextBox("Name", "pageBasicDetails.Name", "")%>
            <%=Html.FormTextArea("Description", "pageBasicDetails.Description", "")%>
            <%=Html.FormButtons(
                    (b) =>
                    {
                        b.Submit("create", "Create");
                        b.Submit("cancel", "Cancel");
                    }
                )%>
        <%} %>
    <%} %>

</asp:Content>
